public class Student {
    private String  name;
    private int age;

    public int getAge() {
        return age;
    }
    public void setAge(int age){
        if(age>120||age<=0){
            System.out.println("年龄输入不合法");
        }else{
             this.age=age;
        }
    }
    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return name;
    }


    public Student(String name,int age){
        this.name=name;
        if(age>120||age<=0){
            System.out.println("年龄输入不合法");
        }else{
            this.age=age;
        }
    }
    public Student(){
    }

    public void show(){
        System.out.println(name+"..."+age);
    }
}
